﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ucBCL_TH.ascx.cs" Inherits="UC_ucBCL_TH" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<asp:UpdatePanel ID="up1" runat="server">
    <ContentTemplate>
        <div class="panel panel-success">
            <div class="panel-heading">
                <h3 class="panel-title">
                    Báo cáo tổng hợp lương nhân viên
                </h3>
            </div>
            <div class="panel-body">
                <div>
                    <asp:DropDownList ID="dlThang" runat="server" Width="150px" CssClass="form-control">
                    </asp:DropDownList>
                    <asp:DropDownList ID="dlNam" runat="server" Width="110px" CssClass="form-control">
                    </asp:DropDownList>
                    <asp:DropDownList ID="dlTimKiem" runat="server" Width="150px" CssClass="form-control"
                        AutoPostBack="true" OnSelectedIndexChanged="dlTimKiem_SelectedIndexChanged">
                        <asp:ListItem Text="--Tìm theo--"></asp:ListItem>
                        <asp:ListItem Text="Nhân viên"></asp:ListItem>
                        <asp:ListItem Text="Bộ phận"></asp:ListItem>
                        <asp:ListItem Text="Chức vụ"></asp:ListItem>
                    </asp:DropDownList>
                    <asp:DropDownList ID="dlNhanVien" Visible="false" ToolTip="Chọn nhân viên" runat="server"
                        DataValueField="IDs" Width="250px" CssClass="form-control" DataTextField="HoTen">
                    </asp:DropDownList>
                    <asp:DropDownList ID="dlBoPhan" Visible="false" ToolTip="Chọn bộ phận" runat="server"
                        DataValueField="IDs" Width="250px" CssClass="form-control" DataTextField="TenBoPhan">
                    </asp:DropDownList>
                    <asp:DropDownList ID="dlChucVu" Visible="false" ToolTip="Chọn chức vụ" runat="server"
                        DataValueField="IDs" Width="250px" CssClass="form-control" DataTextField="TenChucVu">
                    </asp:DropDownList>
                    <asp:DropDownList ID="dlTramTron" Visible="false" Enabled="false" ToolTip="Chọn trạm trộn"
                        runat="server" DataValueField="IDs" Width="150px" CssClass="form-control" DataTextField="TenTramTron">
                    </asp:DropDownList>
                    <asp:Button ID="btnXem" CssClass="btn btn-warning" runat="server" Text="Xem" OnClick="btnXem_Click" />
                    <asp:Button ID="btnSave" runat="server" Style="margin-left: 5px;" Text="Xuất báo cáo"
                        Visible="true" CssClass="btn btn-primary" OnClick="btnPrint_Click" />
                    <asp:Button ID="btnThanhToan" CssClass="btn btn-warning" runat="server" Text="Thanh toán"
                        OnClick="btnThanhToan_Click" Visible="false" />
                    <asp:CheckBox ID="ckAll" runat="server" AutoPostBack="true" Text="Chọn tất cả" OnCheckedChanged="ckAll_CheckedChanged" />
                    <asp:HiddenField ID="hdTuNgay" runat="server" />
                    <asp:HiddenField ID="hdDenNgay" runat="server" />
                    <asp:ValidationSummary ID="ValidationSummary1" HeaderText="" ShowMessageBox="true"
                        ValidationGroup="Them" ShowSummary="false" EnableClientScript="true" runat="server" />
                </div>
                <div style="width: 100%; margin-top: 0px; max-height: 435px; overflow-x: auto;" class="wrapper">
                    <asp:GridView ID="GV" runat="server" AutoGenerateColumns="false" BackColor="White"
                        BorderColor="#CCCCCC" BorderStyle="None" BorderWidth="1px" CellPadding="1" EmptyDataText="Không có dữ liệu nào"
                        EnableModelValidation="True" ShowFooter="true" Width="2000px" CssClass="form-control withall"
                        OnRowDataBound="GV_RowDataBound" OnRowCommand="GV_RowCommand">
                        <Columns>
                            <%--<asp:BoundField DataField="TrangThai" HeaderText="Đã TT" ItemStyle-HorizontalAlign="Center" />--%>
                            <asp:TemplateField HeaderText="Đã TT" ItemStyle-HorizontalAlign="Center">
                                <ItemTemplate>
                                    <asp:LinkButton ID="lbtDel" ForeColor="Purple" OnClientClick="return confirm('Bạn chắc chắn muốn xóa ?')"
                                        runat="server" CommandArgument='<%#Eval("IDs") %>' CommandName="Del" Text='<%#Eval("TrangThai") %>' />
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="Nhân viên" ItemStyle-CssClass="paddingleft">
                                <ItemTemplate>
                                    <asp:CheckBox ID="ckChi" runat="server" Text='<%#Eval("NhanVien") %>' />
                                </ItemTemplate>
                            </asp:TemplateField>
                            <asp:BoundField DataField="BoPhan" HeaderText="Bộ phận" ItemStyle-CssClass="paddingleft" />
                            <asp:BoundField DataField="ChucVu" HeaderText="Chức vụ" ItemStyle-CssClass="paddingleft" />
                            <asp:BoundField DataField="LuongCoBan" HeaderText="Lương CB" ItemStyle-HorizontalAlign="Right"
                                DataFormatString="{0:N0}" />
                            <asp:BoundField DataField="PhuCap" HeaderText="Phụ cấp" ItemStyle-HorizontalAlign="Right"
                                DataFormatString="{0:N0}" />
                            <asp:BoundField DataField="LuongTrachNhiem" HeaderText="Lương trách nhiệm" ItemStyle-HorizontalAlign="Right"
                                DataFormatString="{0:N0}" />
                            <%--<asp:BoundField DataField="TuNgay" HeaderText="Từ ngày" ItemStyle-HorizontalAlign="Center" />
                            <asp:BoundField DataField="DenNgay" HeaderText="Đến ngày" ItemStyle-HorizontalAlign="Center" />--%>
                            <asp:BoundField DataField="SoNgayLV" HeaderText="Số ngày LV" ItemStyle-HorizontalAlign="Center" />
                            <asp:BoundField DataField="TongLuongCB" HeaderText="Tổng lương CB" ItemStyle-HorizontalAlign="Right"
                                DataFormatString="{0:N0}" />
                            <asp:BoundField DataField="TienThuong" HeaderText="Tiền thưởng" ItemStyle-HorizontalAlign="Right"
                                DataFormatString="{0:N0}" />
                            <asp:BoundField DataField="TienCongDem" HeaderText="Tiền công đêm" ItemStyle-HorizontalAlign="Right"
                                DataFormatString="{0:N0}" />
                            <asp:BoundField DataField="TienAnCa" HeaderText="Tiền ăn ca" ItemStyle-HorizontalAlign="Right"
                                DataFormatString="{0:N0}" />
                            <asp:BoundField DataField="TienPhat" HeaderText="Tiền phạt" ItemStyle-HorizontalAlign="Right"
                                DataFormatString="{0:N0}" />
                            <asp:BoundField DataField="TienUng" HeaderText="Tiền ứng" ItemStyle-HorizontalAlign="Right"
                                DataFormatString="{0:N0}" />
                            <asp:BoundField DataField="TienCongDoan" HeaderText="Tiền công đoàn" ItemStyle-HorizontalAlign="Right"
                                DataFormatString="{0:N0}" />
                            <asp:BoundField DataField="LuongSL" HeaderText="Lương SL" ItemStyle-HorizontalAlign="Right"
                                DataFormatString="{0:N0}" />
                            <asp:BoundField DataField="ThucLinh" HeaderText="Thực lĩnh" ItemStyle-HorizontalAlign="Right"
                                DataFormatString="{0:N0}" />
                            <asp:TemplateField Visible="false">
                                <ItemTemplate>
                                    <asp:Label ID="lbID" runat="server" Text='<%#Eval("IDs") %>' />
                                </ItemTemplate>
                            </asp:TemplateField>
                        </Columns>
                        <FooterStyle BackColor="White" ForeColor="#000066" Font-Bold="True" HorizontalAlign="Right" />
                        <HeaderStyle BackColor="White" Font-Bold="True" ForeColor="Black" Height="30px" />
                        <PagerStyle BackColor="White" ForeColor="#000066" HorizontalAlign="Left" />
                        <RowStyle BackColor="White" ForeColor="#000066" Height="30px" />
                        <SelectedRowStyle BackColor="Lavender" Font-Bold="false" />
                    </asp:GridView>
                </div>
                <div style="margin: 5px;">
                    <asp:Button ID="btnFirst" runat="server" Text="Đầu" CssClass="btn btn-primary" OnClick="btnFirst_Click" />
                    <asp:Button ID="btnPre" runat="server" Style="margin-left: 5px;" Text="Trước" CssClass="btn btn-primary"
                        OnClick="btnPre_Click" />
                    <asp:Button ID="btnNext" runat="server" Style="margin-left: 5px;" Text="Sau" CssClass="btn btn-warning"
                        OnClick="btnNext_Click" />
                </div>
            </div>
        </div>
    </ContentTemplate>
    <Triggers>
        <asp:PostBackTrigger ControlID="btnSave" />
    </Triggers>
</asp:UpdatePanel>
